/**
 * <copyright>
 * </copyright>
 *
 */
package co.edu.unal.research.contentprovider.contentProviderDsl.impl;

import co.edu.unal.research.contentprovider.contentProviderDsl.Configuration;
import co.edu.unal.research.contentprovider.contentProviderDsl.ContentProviderDslPackage;

import org.eclipse.emf.common.notify.Notification;

import org.eclipse.emf.ecore.EClass;

import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Configuration</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link co.edu.unal.research.contentprovider.contentProviderDsl.impl.ConfigurationImpl#getAuthority <em>Authority</em>}</li>
 *   <li>{@link co.edu.unal.research.contentprovider.contentProviderDsl.impl.ConfigurationImpl#getBasePath <em>Base Path</em>}</li>
 *   <li>{@link co.edu.unal.research.contentprovider.contentProviderDsl.impl.ConfigurationImpl#getPackageName <em>Package Name</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public class ConfigurationImpl extends MinimalEObjectImpl.Container implements Configuration
{
  /**
   * The default value of the '{@link #getAuthority() <em>Authority</em>}' attribute.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see #getAuthority()
   * @generated
   * @ordered
   */
  protected static final String AUTHORITY_EDEFAULT = null;

  /**
   * The cached value of the '{@link #getAuthority() <em>Authority</em>}' attribute.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see #getAuthority()
   * @generated
   * @ordered
   */
  protected String authority = AUTHORITY_EDEFAULT;

  /**
   * The default value of the '{@link #getBasePath() <em>Base Path</em>}' attribute.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see #getBasePath()
   * @generated
   * @ordered
   */
  protected static final String BASE_PATH_EDEFAULT = null;

  /**
   * The cached value of the '{@link #getBasePath() <em>Base Path</em>}' attribute.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see #getBasePath()
   * @generated
   * @ordered
   */
  protected String basePath = BASE_PATH_EDEFAULT;

  /**
   * The default value of the '{@link #getPackageName() <em>Package Name</em>}' attribute.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see #getPackageName()
   * @generated
   * @ordered
   */
  protected static final String PACKAGE_NAME_EDEFAULT = null;

  /**
   * The cached value of the '{@link #getPackageName() <em>Package Name</em>}' attribute.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see #getPackageName()
   * @generated
   * @ordered
   */
  protected String packageName = PACKAGE_NAME_EDEFAULT;

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  protected ConfigurationImpl()
  {
    super();
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  protected EClass eStaticClass()
  {
    return ContentProviderDslPackage.Literals.CONFIGURATION;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public String getAuthority()
  {
    return authority;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public void setAuthority(String newAuthority)
  {
    String oldAuthority = authority;
    authority = newAuthority;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, ContentProviderDslPackage.CONFIGURATION__AUTHORITY, oldAuthority, authority));
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public String getBasePath()
  {
    return basePath;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public void setBasePath(String newBasePath)
  {
    String oldBasePath = basePath;
    basePath = newBasePath;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, ContentProviderDslPackage.CONFIGURATION__BASE_PATH, oldBasePath, basePath));
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public String getPackageName()
  {
    return packageName;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public void setPackageName(String newPackageName)
  {
    String oldPackageName = packageName;
    packageName = newPackageName;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, ContentProviderDslPackage.CONFIGURATION__PACKAGE_NAME, oldPackageName, packageName));
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public Object eGet(int featureID, boolean resolve, boolean coreType)
  {
    switch (featureID)
    {
      case ContentProviderDslPackage.CONFIGURATION__AUTHORITY:
        return getAuthority();
      case ContentProviderDslPackage.CONFIGURATION__BASE_PATH:
        return getBasePath();
      case ContentProviderDslPackage.CONFIGURATION__PACKAGE_NAME:
        return getPackageName();
    }
    return super.eGet(featureID, resolve, coreType);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public void eSet(int featureID, Object newValue)
  {
    switch (featureID)
    {
      case ContentProviderDslPackage.CONFIGURATION__AUTHORITY:
        setAuthority((String)newValue);
        return;
      case ContentProviderDslPackage.CONFIGURATION__BASE_PATH:
        setBasePath((String)newValue);
        return;
      case ContentProviderDslPackage.CONFIGURATION__PACKAGE_NAME:
        setPackageName((String)newValue);
        return;
    }
    super.eSet(featureID, newValue);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public void eUnset(int featureID)
  {
    switch (featureID)
    {
      case ContentProviderDslPackage.CONFIGURATION__AUTHORITY:
        setAuthority(AUTHORITY_EDEFAULT);
        return;
      case ContentProviderDslPackage.CONFIGURATION__BASE_PATH:
        setBasePath(BASE_PATH_EDEFAULT);
        return;
      case ContentProviderDslPackage.CONFIGURATION__PACKAGE_NAME:
        setPackageName(PACKAGE_NAME_EDEFAULT);
        return;
    }
    super.eUnset(featureID);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public boolean eIsSet(int featureID)
  {
    switch (featureID)
    {
      case ContentProviderDslPackage.CONFIGURATION__AUTHORITY:
        return AUTHORITY_EDEFAULT == null ? authority != null : !AUTHORITY_EDEFAULT.equals(authority);
      case ContentProviderDslPackage.CONFIGURATION__BASE_PATH:
        return BASE_PATH_EDEFAULT == null ? basePath != null : !BASE_PATH_EDEFAULT.equals(basePath);
      case ContentProviderDslPackage.CONFIGURATION__PACKAGE_NAME:
        return PACKAGE_NAME_EDEFAULT == null ? packageName != null : !PACKAGE_NAME_EDEFAULT.equals(packageName);
    }
    return super.eIsSet(featureID);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public String toString()
  {
    if (eIsProxy()) return super.toString();

    StringBuffer result = new StringBuffer(super.toString());
    result.append(" (authority: ");
    result.append(authority);
    result.append(", basePath: ");
    result.append(basePath);
    result.append(", packageName: ");
    result.append(packageName);
    result.append(')');
    return result.toString();
  }

} //ConfigurationImpl
